<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>    
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>
<body>
    <div id="app">
       <my-component></my-component>
    </div>
    <script>
        var options = {
            data(){
                return{
                    msg:"我是子组件中的data值"
                }
            },
            template:"<div>{{msg}}</div>"
        }

        new Vue({
            el:"#app",
            components:{
                "my-component":options,
            }
        });
    </script>
</body>
</html>